﻿<!-- Modal -->
<div class="modal_cus fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="BicycleModalLabel" aria-hidden="true" style='top: 15%;' data-backdrop="static" data-keyboard="false">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header modal_tag">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    ×
                </button>
                <h4 class="modal-title" id="BicycleModalLabel">
                    {{isEdit?'编辑':'新增'}}故障维护信息
                </h4>
            </div>
            <div class="modal-body" style="max-height:450px;">
                <div id="successAlert1" class="alert alert-success" style="display:none;"></div>
                <div id="warningAlert1" class="alert alert-warning" style="display:none;"></div>
                <div class="span12">
                    <form name="memberBasicInfoForm" action="#" class="modal-body form-horizontal" style="max-height: inherit; ">

                        <input type="hidden" name="BreakdownGuid" id="BreakdownGuid" ng-model="BicycleItem.BreakdownGuid" />
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="BicyCleNumber"><span style="color:red;">*</span>车辆编号</label>
                            <div class="col-sm-10" ng-if="isEdit">
                              <input name='BicyCleNumber' class="m-wrap form-control" type="text" ng-model='BicycleItem.BicyCleNumber' id="BicyCleNumber" ng-minlength='1' ng-maxlength='20' maxlength="20" disabled="disabled" />
                            </div>
                            <div class="col-sm-10" ng-if="!isEdit">
                                <input name='BicyCleNumber' class="m-wrap form-control" type="text" ng-model='BicycleItem.BicyCleNumber' id="BicyCleNumber" ng-minlength='1' ng-maxlength='20' maxlength="20" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="Longitude"><span style="color:red;">*</span>经度</label>
                            <div class="col-sm-4" ng-if="isEdit">
                                <input name='Longitude' class="m-wrap form-control" type="text" ng-model='BicycleItem.Longitude' id="Longitude" maxlength="12" disabled="disabled" ng-trim />
                                <div class="xjl-warningMessage xjl-mtop5" ng-if="BicycleItem.Longitude != null && BicycleItem.Longitude !='' && !IsLongitude(BicycleItem.Longitude)">经度范围±0～±180，1到9位小数</div>
                            </div>
                            <div class="col-sm-4" ng-if="!isEdit">
                                <input name='Longitude' class="m-wrap form-control" type="text" ng-model='BicycleItem.Longitude' id="Longitude" maxlength="12"  ng-trim />
                                <div class="xjl-warningMessage xjl-mtop5" ng-if="BicycleItem.Longitude != null && BicycleItem.Longitude !='' && !IsLongitude(BicycleItem.Longitude)">经度范围±0～±180，1到9位小数</div>
                            </div>
                            <label class="col-sm-2 control-label" for="Latitude"><span style="color:red;">*</span>纬度</label>
                            <div class="col-sm-4" ng-if="isEdit">
                                <input name='Latitude' class="m-wrap form-control" type="text"  ng-model='BicycleItem.Latitude' id="Latitude" maxlength="12" disabled="disabled" ng-trim />
                                <div class="xjl-warningMessage xjl-mtop5" ng-if="BicycleItem.Latitude != null && BicycleItem.Latitude != '' && !IsLatitude(BicycleItem.Latitude)">纬度范围±90～±90，1到9位小数</div>
                            </div>
                            <div class="col-sm-4" ng-if="!isEdit">
                                <input name='Latitude' class="m-wrap form-control" type="text" ng-model='BicycleItem.Latitude' id="Latitude" maxlength="12" ng-trim />
                                <div class="xjl-warningMessage xjl-mtop5" ng-if="BicycleItem.Latitude != null && BicycleItem.Latitude != '' && !IsLatitude(BicycleItem.Latitude)">纬度范围±90～±90，1到9位小数</div>
                            </div>

                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="BreakTypeNameID"><span style="color:red;">*</span>故障类型</label>
                            <div class="col-sm-10">
                                <select class="form-inline row-control select-inline" ng-model="BicycleItem.BreakTypeNameID" ng-options="o.id as o.name for o in  BreakTypeNameID" id="BreakTypeNameID" name="BreakTypeNameID">
                                    <option value="">(请选择)</option>
                                </select>
                            </div>


                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="GradeNameID"><span style="color:red;">*</span>维修等级</label>
                            <div class="col-sm-10">
                                <select class="form-inline row-control select-inline" ng-model="BicycleItem.GradeNameID" ng-options="o.id as o.name for o in  GradeNameID" id="GradeNameID" name="GradeNameID">
                                    <option value="">(请选择)</option>

                                </select>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-2 control-label" for=""><span style="color:red;">*</span>状态</label>
                            <div class="col-sm-10" ng-if="isEdit" >
                                <select class="form-inline row-control select-inline" ng-model="BicycleItem.Status" ng-options="o.id as o.name for o in  StatusNames" id="Status" name="Status" disabled="disabled">
                                    <option value="">(请选择)</option>
                                    <!--<option value=1>正常</option>
                                    <option value=0>报警</option>-->
                                </select>
                            </div>
                            <div class="col-sm-10" ng-if="!isEdit">
                                <select class="form-inline row-control select-inline" ng-model="BicycleItem.Status" ng-options="o.id as o.name for o in  StatusNames" id="Status" name="Status" disabled="disabled">
                                    <option value="">(请选择)</option>
                                    <!--<option value=1>正常</option>
            <option value=0>报警</option>-->
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="Address">详细地址</label>
                            <div class="col-sm-10"  ng-if="isEdit">
                                <input name='Address' class="m-wrap form-control" type="text" ng-model='BicycleItem.Address' id="Address" disabled="disabled" />
                            </div>
                            <div class="col-sm-10"  ng-if="!isEdit">
                                <input name='Address' class="m-wrap form-control" type="text" ng-model='BicycleItem.Address' id="Address" />
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="pic">故障图片</label>
                            <div class="col-sm-10" ng-if="isEdit">
                                <a ng-click="onzoomPic($event,true)" ng-repeat="sk in BicycleItem.PicLoc"><img ng-src="{{sk}}" style="width:50px;height:50px;border:0;" id="qpic" class="img-rounded" alt="" /></a>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label" for="Remark">备注</label>
                            <div class="col-sm-10">
                                <textarea id="Remark" rows="6" ng-model="BicycleItem.Remark" name="Remark" style="width:100%"></textarea>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" ng-click='onUpdate()' ng-disabled="BicycleItem.BicyCleNumber == null || BicycleItem.BicyCleNumber == '' || BicycleItem.Longitude == null || BicycleItem.Longitude == '' || BicycleItem.Latitude == null || BicycleItem.Latitude == ''">
                    <i class="icon-save"></i>保存
                </button>
                <button type="button" class="btn btn-default" data-dismiss="modal">
                    <i class="icon-remove-sign"></i>关闭
                </button>
            </div>
        </div>
    </div>
</div>